//
//  HCALDetailViewController.m
//  HappyChildren
//
//  Created by WillyZhao on 2017/3/13.
//  Copyright © 2017年 WillyZhao. All rights reserved.
//

#import "HCALDetailViewController.h"

@interface HCALDetailViewController () <UIWebViewDelegate> {
    HCPopLoadingView *popLoading;
}

@end

@implementation HCALDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.textTitle = @"成长相册推荐";
    NSString *url = [NSString stringWithFormat:@"%@",self.parameterObject];
    if ([PublicFunction isNull:url]) {
        
    }else{
        popLoading = [[HCPopLoadingView alloc] initWithFrame:[UIScreen mainScreen].bounds];
        [popLoading showAnimate];
        UIWebView *web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.centerView.frame.size.width, self.centerView.frame.size.height)];
        web.delegate = self;
        [web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
        [self.centerView addSubview:web];
    }
    
    // Do any additional setup after loading the view.
}

-(void)webViewDidFinishLoad:(UIWebView *)webView {
    [popLoading hidden];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
